package Plagger::Plugin::Filter::ReverseEntry;

use strict;
use base qw( Plagger::Plugin );

sub register {
    my ( $self, $context ) = @_;
    $context->register_hook( 
        $self, 
        'update.feed.fixup' => \&feed,
    );
}

sub feed {
 	    my($self, $context, $args) = @_; 
 	    my @entry_buff;
 	    $args->{feed}->entries;	
 	    for my $entry ($args->{feed}->entries) {
 	    	push @entry_buff,$entry;
        }
        $args->{feed}->clear_entries;
        for my $entry (reverse @entry_buff) {
        	$args->{feed}->add_entry($entry);
        }
}

1;


__END__

=head1 NAME

Plagger::Plugin::Filter::ReverseEntry 

=head1 SYNOPSIS

  - module: Filter::ReverseEntry

=head1 DESCRIPTION


=head1 EXAMPLE


=head1 AUTHOR

Akihito Takeda

=head1 SEE ALSO

L<Plagger>

=cut
